package com.mp.pojo.Query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * @author jack
 * @data 2019-08-09 14:00
 */
@Data
@ApiModel(value = "修改用户对象")
public class UserInfoEditQuery {

    @NotNull(message="用户id不能为空")
    @ApiModelProperty(value = "用户id", example = "15055", required = true)
    private Integer id;


    @ApiModelProperty(value = "用户描述", example = "jack")
    private String remark;

    @ApiModelProperty(value = "获取手机号码的间隔时间(保留两位小数)", example = "1.25")
    @Digits(message="获取手机号间隔时间 只允许2位小数,2位整数",integer = 2, fraction = 2)
    @DecimalMin(message="获取手机号间隔时间 不能低于0.01", value = "0.01")
    private BigDecimal phoneInterval;

    @ApiModelProperty(value = "获取短信间隔时间 (保留两位小数)", example = "1.25")
    @Digits(message="获取短信间隔时间 只允许2位小数,2位整数",integer = 2, fraction = 2)
    @DecimalMin(message="获取短信间隔时间 不能低于0.01", value = "0.01")
    private BigDecimal msgInterval;


    @ApiModelProperty(value = "状态 1正常，2冻结", example = "1")
    @Range(message = "状态值错误  1正常，2冻结", min = 1, max = 2)
    private Integer status;

}
